<template>
  <div id="app">
    <category title="游戏">
<!--      注意：定义域插槽必须要在template里面 -->
      <template scope="cty">
        使用者会接收到一个对象 -->
        <ul slot="test">
          <li v-for="(item,index) in cty.games" :key="index">{{ item }}</li>
        </ul>
      </template>
    </category>
  </div>
</template>

<script>
import category from "@/components/Category.vue";

export default {
  name: 'App',
  components: {
    category
  },
}
</script>

<style>
#app {
  display: flex;
  justify-content: space-around;
}
</style>
